package org.example.pojo;

import java.util.Objects;

public class User {
    private Long id; //id属性
    private String userame;//用户名
    private String password;//密码
    private String phone; //电话号码
    private String gender;//性别
    private LocalDate birthday;
    private String avatar;
    private LocalDateTime create_time;//注册时间
    private LocalDateTime last_login_time;//最后登陆时间


    public User() {
    }

    public User(Long id, String userame, String password, String phone, String gender, LocalDate birthday, String avatar, LocalDateTime create_time, LocalDateTime last_login_time) {
        this.id = id;
        this.userame = userame;
        this.password = password;
        this.phone = phone;
        this.gender = gender;
        this.birthday = birthday;
        this.avatar = avatar;
        this.create_time = create_time;
        this.last_login_time = last_login_time;
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUserame() {
        return userame;
    }

    public void setUserame(String userame) {
        this.userame = userame;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public LocalDateTime getCreate_time() {
        return create_time;
    }

    public void setCreate_time(LocalDateTime create_time) {
        this.create_time = create_time;
    }

    public LocalDateTime getLast_login_time() {
        return last_login_time;
    }

    public void setLast_login_time(LocalDateTime last_login_time) {
        this.last_login_time = last_login_time;
    }


    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(id, user.id) && Objects.equals(userame, user.userame) && Objects.equals(password, user.password) && Objects.equals(phone, user.phone) && Objects.equals(gender, user.gender) && Objects.equals(birthday, user.birthday) && Objects.equals(avatar, user.avatar) && Objects.equals(create_time, user.create_time) && Objects.equals(last_login_time, user.last_login_time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userame, password, phone, gender, birthday, avatar, create_time, last_login_time);
    }
}
